<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
	<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
		<!DOCTYPE >
		<html>

		<head>
			<base href="<%=basePath%>">
			<title>HPV检测</title>
			<meta charset="utf-8" />
			<meta http-equiv="X-UA-Compatible" content="IE=edge" />
			<meta name="viewport" content="width=device-width, initial-scale=1" />
			<link rel="icon" href="favicon.ico" />
			<link href="static/manage-sys/css/bootstrap.min.css" rel="stylesheet" />
			<link href="static/manage-sys/css/font-awesome.min.css" rel="stylesheet" />
			<link href="static/manage-sys/css/default.css" rel="stylesheet" type="text/css" />
			<script src="static/manage-sys/js/jquery.min.js"></script>
			<!--[if lt IE 9]>
			  <script src="js/bootstrap/html5shiv.min.js"></script>
			  <script src="js/bootstrap/respond.min.js"></script>
			<![endif]-->
			<!--页面加载进度条-->
			<link href="static/manage-sys/css/pace/dataurl.css" rel="stylesheet" />
			<script src="static/manage-sys/js/pace/pace.min.js"></script>
			<script src="static/manage-sys/js/jquery.scrolltopcontrol/scrolltopcontrol.js" type="text/javascript"></script>
			<script src="static/manage-sys/js/jquery.extend.js" type="text/javascript"></script>
			<script src="static/manage-sys/js/default.js" type="text/javascript"></script>

			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/easyui/themes/ui-cupertino/easyui.css" />
			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/easyui/themes/icon.css" />
			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/css/icon.css" />
			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/css/uims.css" />
			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/css/temp.css" />
			<!-- HPV检测页面样式-->
			<link rel="stylesheet" type="text/css" href="static/manage-sys/add-sample/css/hpv.css" />

			<script type="text/javascript" src="static/manage-sys/add-sample/easyui/jquery.easyui.min.js"></script>
			<script type="text/javascript" src="static/manage-sys/add-sample/easyui/locale/easyui-lang-zh_CN.js"></script>

			<script src="static/manage-sys/js/bootstrap/bootstrap.min.js"></script>
			<script src="static/manage-sys/js/bootstrap/bootstrap-table.min.js"></script>
			<script src="static/manage-sys/js/bootstrap/bootstrap-table-zh-CN.min.js"></script>

			<script type="text/javascript" src="static/manage-sys/add-sample/js/dataGridCellTip.js"></script>
			<script type="text/javascript" src="static/manage-sys/add-sample/js/validate.js"></script>
			<script type="text/javascript" src="static/manage-sys/add-sample/js/json2.js"></script>

			<script type="text/javascript" src="static/manage-sys/add-sample/js/sampleCommon.js"></script>
			<script type="text/javascript" src="static/manage-sys/add-sample/js/template.js"></script>
			<script type="text/javascript" src="static/manage-sys/add-sample/js/HPV.js"></script>

			<!-- artTemplate 模板引擎 -->
			<script src="static/manage-sys/js/template-web.js" type="text/javascript"></script>

			<!-- 设置送检单位 -->
			<script src="static/manage-sys/js/set-customer.js" type="text/javascript"></script>

		</head>

		<body>
			<!--我是主要内容-->
			<div class="container">
				<div class="content">
					<div class="coupon-box" onclick="chooseCoupon()">
						选择免费券
					</div>
					<table class="second-table t-group">
						<thead></thead>
						<tbody>
							<tr class="blue-tr">
								<td class="droppable t-group-title">送检单位信息</td>
							</tr>
							<tr>
								<td class="droppable">
									<span class="field t-group-item">
										<span class="required">*</span>
										<i class="t-field-id" data-value="customerCode"></i>
										<i class="t-type" data-value="text"></i>
										<i class="t-name t-require">送检单位</i>：
										<select value="" class="addressCounty" onchange="onAddressCountyChange(this.value)"></select>
										<input id="customerCode" style="width:168px;" class="easyui-combobox" data-options="valueField:'customerCode',textField:'customerName'">
									</span>
								</td>
							</tr>
							<tr>
								<td class="droppable">
									<span class="field t-group-item">
										<i class="t-field-id" data-value="departments"></i>
										<i class="t-name">科室</i>：
										<input type="text" id="departments" style="width: 97px;" class="t-value">
									</span>
									<span class="field t-group-item">
										<span class="required">*</span>
										<i class="t-field-id" data-value="doctorName"></i>
										<i class="t-name t-require">送检医生</i>：
										<input type="text" id="doctorName" style="width: 118.6px;" validate="required" class="t-value">
									</span>
								</td>
							</tr>
						</tbody>
					</table>
					<table class="second-table t-group">
						<tr class="blue-tr">
							<td class="t-group-title">样本信息</td>
						</tr>
						<tr>
							<td class="droppable">
								<span class="t-group-item">
									<i class="t-field-id" data-value="sampleType"></i>
									<i class="t-name">样本类型</i>：
									<span class="sample-type field">
										<input value="30" type="checkbox" class="t-value" data-name="华大保存液" data-value="30">华大保存液
									</span>
									<span class="sample-type field">
										<input value="14" type="checkbox" class="t-value" data-name="FTA卡" data-value="14">FTA卡
									</span>
								</span>
								<span class="field t-group-item" style="margin-left: 100px;">
									<span class="required">*</span>
									<i class="t-field-id" data-value="bloodDate"></i>
									<i class="t-name t-require">取样日期</i>：
									<input type="date" id="bloodDate" validate="required" class="t-value">
								</span>
							</td>
						</tr>
					</table>
					<table class="second-table t-group">
						<tbody>
							<tr class="blue-tr">
								<td class="t-group-title">受检者信息</td>
							</tr>
							<tr>
								<td class="droppable">
									<span class="field t-group-item">
										<span class="required">*</span>
										<i class="t-field-id" data-value="sampleName"></i>
										<i class="t-name t-require">姓名</i>：
										<input type="text" id="sampleName" validate="required" style="width: 109.4px;" class="t-value">
									</span>
									<span class="field t-group-item">
										<span class="required">*</span>
										<i class="t-field-id" data-value="sampleSex"></i>
										<i class="t-name t-require">性别</i>：
										<select id="sampleSex" style="width: 65.8px;" validate="required">
											<option value="0" class="t-value" data-name="未知" data-value="0">未知</option>
											<option value="1" class="t-value" data-name="男" data-value="1">男</option>
											<option value="2" class="t-value" data-name="女" data-value="2">女</option>
										</select>
									</span>
									<span class="field t-group-item">
										<i class="t-field-id" data-value="sampleAge"></i>
										<i class="t-name t-require">年龄</i>：
										<input type="number" id="sampleAge" style="width: 54.8px;" class="t-value">
									</span>
									<span class="field t-group-item">
										<i class="t-field-id" data-value="isMarried"></i>
										<i class="t-name">婚否</i>：
										<input type="text" id="isMarried" style="width: 79.8px;" class="t-value">
									</span>
									<span class="field t-group-item">
										<span class="required">*</span>
										<i class="t-field-id" data-value="motherPhoneNum"></i>
										<i class="t-type" data-value="phoneNum"></i>
										<i class="t-name t-require">联系电话</i>：
										<input type="text" id="motherPhoneNum" style="width: 150px;" validate="required,phoneNum" class="t-value">
									</span>
								</td>
							</tr>
							<tr>
								<td class="droppable">
									<span class="field t-group-item">
										<i class="t-field-id" data-value="address"></i>
										<i class="t-name">现居住址</i>：
										<i class="t-type" data-value="address"></i>
										<input type="text" id="address1" style="width: 100px;">省
										<input type="text" id="address2" style="width: 100px;">市/镇
										<input type="text" id="address3" style="width: 100px;">区/县
										<input type="text" id="address4" style="width: 100px;">
									</span>
									<span class="field t-group-item">
										<i class="t-field-id" data-value="postNum"></i>
										<i class="t-name">邮编</i>：
										<input type="text" style="width: 142px;" id="postNum" class="t-value">
									</span>
								</td>
							</tr>
							<tr>
								<td class="droppable">
									<span class="field t-group-item">
										<i class="t-field-id" data-value="hosptialNum"></i>
										<i class="t-name">门诊号/住院号</i>：
										<input type="text" id="hosptialNum" style="width: 102px;" class="t-value">
									</span>
									<span class="field t-group-item">
										<i class="t-field-id" data-value="idCard"></i>
										<i class="t-name t-require">身份证号</i>：
										<input type="text" id="idCard" validate="idCard" style="width: 180px;" class="t-value">
									</span>
								</td>
							</tr>

						</tbody>
					</table>
					<table class="second-table t-group">
						<tr class="blue-tr">
							<td class="t-group-title">临床信息</td>
						</tr>
						<tr>
							<td class="droppable">
								<span class="field t-group-item">
									<i class="t-field-id" data-value="lmp"></i>
									<i class="t-name">末次月经</i>：
									<input type="date" id="lmp" class="t-value">
								</span>
							</td>
						</tr>
						<tr>
							<td class="droppable column2">
								<span class="field t-group-item">
									<i class="t-field-id" data-value="clinicalDiagnosis"></i>
									<i class="t-name">临床诊断</i>：
									<input type="text" id="clinicalDiagnosis" class="t-value">
								</span>
								<span class="field t-group-item">
									<i class="t-field-id" data-value="personalHistory"></i>
									<i class="t-name">既往病史</i>：
									<input type="text" id="personalHistory" class="t-value">
								</span>
							</td>
						</tr>
					</table>
					<table class="second-table t-group">
						<tbody>
							<tr class="blue-tr">
								<td class="t-group-title">产品信息</td>
							</tr>
							<tr>
								<td class="droppable">
									<span class="field t-group-item-product">
										<input id="product_DX0532" type="checkbox" disabled="disabled">
										<b>
											<span id="productName_DX0532" class="t-product-name">HPV检测</span>
										</b>（
										<i class="t-product-value">DX0532</i>）
									</span>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				<div style="width:220px; margin: 30px auto;">
					<button onclick="save();" style="width: 120px; height: 33px; border-radius: 2px; border-radius: 4px; background: rgb(23,134,184); color: #fff; outline: none; border-color: transparent;">保存</button>
				</div>
			</div>
			<!-- 模态框（Modal） -->
			<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
								&times;
							</button>
							<h4 class="modal-title" id="myModalLabel">
								免费券列表
							</h4>
						</div>
						<div class="modal-body">
							<div class="search-box" style='display:flex;flex-direction:row'>
								<input type="text" placeholder="请输入证件号码" id="coupon-kw" style="display:inline-block;flex:1">
								<button onclick="searchCoupons()">搜索</button>
							</div>
							<div class="no-coupon">
								不使用免费券
							</div>
							<div class="empty-coupon">
								没有免费券
							</div>
							<div class="coupon-list">
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">
								关闭
							</button>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal -->
			</div>
			<a href="#top" id="goTop">
				<i class="fa fa-angle-up fa-3x"></i>
			</a>
			<script type="text/javascript">
                $("#product_DX0532")[0].checked = true;
			</script>
			<!-- 优惠券列表渲染 -->
			<script id="coupon-list" type="text/html">
				{{each rows item i}}
					<div class="coupon-item">
						<div class="content-wrapper">
							<div class="name">{{item.couponName}}</div>
							<div class="desc">{{item.couponDesc}}</div>
						</div>
						{{if item.productCode == 'DX0532' && item.status == '1'}}
							<button class="btn btn-primary" onclick="useCoupon('{{item.couponNum}}')">使用</button>
						{{/if}}
						{{if item.productCode != 'DX0532' || (item.productCode == 'DX0532' && item.status != '1')}}
							<button class="btn btn-disbled" disabled>不可用</button>
						{{/if}}
					</div>
				{{/each}}
			</script>
		</body>

		</html>